package modelo;
// default package
// Generated 03/11/2014 12:06:03 by Hibernate Tools 4.0.0

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Cita generated by hbm2java
 */
@Entity
@Table(name = "cita", catalog = "eventos_compartidos")
public class Cita implements java.io.Serializable {

	private Integer id;
	private Estadocita estadocita;
	private Salon salon;
	private Interesado interesado;
	private Date fecha;
	private Date hora;
	private String observacion;

	public Cita() {
	}

	public Cita(Estadocita estadocita, Salon salon, Interesado interesado,
			Date fecha, Date hora, String observacion) {
		this.estadocita = estadocita;
		this.salon = salon;
		this.interesado = interesado;
		this.fecha = fecha;
		this.hora = hora;
		this.observacion = observacion;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idEstadoCita")
	public Estadocita getEstadocita() {
		return this.estadocita;
	}

	public void setEstadocita(Estadocita estadocita) {
		this.estadocita = estadocita;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idSalon")
	public Salon getSalon() {
		return this.salon;
	}

	public void setSalon(Salon salon) {
		this.salon = salon;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idInteresado")
	public Interesado getInteresado() {
		return this.interesado;
	}

	public void setInteresado(Interesado interesado) {
		this.interesado = interesado;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "fecha", length = 10)
	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	@Temporal(TemporalType.TIME)
	@Column(name = "hora", length = 8)
	public Date getHora() {
		return this.hora;
	}

	public void setHora(Date hora) {
		this.hora = hora;
	}

	@Column(name = "observacion", length = 50)
	public String getObservacion() {
		return this.observacion;
	}

	public void setObservacion(String observacion) {
		this.observacion = observacion;
	}

}
